home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 26.zip / BS1 part 26 / Cando v1.6 disk 2.adf / HelpFiles / Variables, Advanced  < prev    next >
Text File  |  1992-01-31  |  11KB  |  501 lines

  1. F- Alias                |alias|
  2. F- BumpRevision            |bumprevision|
  3. F- Case                    |case|
  4. F- CharsToHex            |charstohex|
  5. C- DeleteArrayEntry        |deletearrayentry|
  6. F- Evaluate                |evaluate|
  7. F- EvaluateExpression    |evaluateexpression|
  8. F- FirstArrayIndex        |firstarrayindex|
  9. F- FormatValue            |formatvalue|
  10. V- GetDBObjects            |getdbobjects|
  11. C- Global                |global|
  12. F- HexToChars            |hextochars|
  13. F- HexToInteger            |hextointeger|
  14. V- Infinity                |infinity|
  15. F- IntegerToHex            |integertohex|
  16. F- IfThen                |ifthen|
  17. F- Input                |input|
  18. C- InsertArrayEntry        |insertarrayentry|
  19. C- InsertRecordNames    |insertrecordnames|
  20. F- IsAlias                |isalias|
  21. F- LastArrayIndex        |lastarrayindex|
  22. F- Limit                |limit|
  23. F- LoadVariable            |loadvariable|
  24. C- Local                |local|
  25. F- Match                |match|
  26. F- NextArrayIndex        |nextarrayindex|
  27. V- NotANumber            |notanumber|
  28. F- NumberOfArrayEntries    |numberofarrayentries|
  29. F- PreviousArrayIndex    |previousarrayindex|
  30. C- SaveVariable            |savevariable|
  31. F- SearchArray            |searcharray|
  32. C- SetDBObjects            |setdbobjects|
  33. C- SetSearchArrayFlags    |setsearcharrayflags|
  34. C- SortArray            |sortarray|
  35. C- Static                |static|
  36. F- ValidReal            |validreal|
  37. F- VarType                |vartype|
  38. F- VerifyExpression        |verifyexpression|
  39. [E]
  40.  
  41. |alias|
  42. WT <Variable>=Alias({String})
  43. PL Makes the resulting variable the same
  44. PL variable as the variable name given in the
  45. PL {String}.  See pages 6-16, 6-28 and 6-50
  46. PL thru 6-54 in the supplement manual for a
  47. PL full description of this command.
  48. PT SEE ALSO: 
  49. BS IsAlias
  50. PT .
  51. ED
  52.  
  53. |bumprevision|
  54. WT {String}=BumpRevision({String})
  55. PL Changes the revision of {String} in the
  56. PL same manner as the Workbench Duplicate
  57. PL function does with a filename.  See page
  58. PL 6-16 in the yellow manual for examples. 
  59. ED
  60.  
  61. |case|
  62. WT {Result}=Case({Integer}, {Expression1} [,up to ten expressions] )
  63. PL Returns the expression corresponding to the
  64. PL {Integer}.  For example:
  65. PL  <- Let X = 2
  66. PL  <- Echo Case(X,"Gold","Silver","Bronze")
  67. PL  -> Silver
  68. PT SEE ALSO: 
  69. BS IfThen
  70. PT  and 
  71. BS Match
  72. PT .
  73. ED
  74.  
  75. |charstohex|
  76. WT {HexString}=CharsToHex({String})
  77. PL This converts a normal string into a hex-
  78. PL string.  The hexstring will have twice as
  79. PL many characters as the given string.
  80. PL  <- Echo CharsToHex("CanDo 1.6")
  81. PL  -> 43616E446F2056312E36
  82. PT SEE ALSO: 
  83. BS HexToChars
  84. PT  and 
  85. BS FileWriteChars
  86. PT .
  87. ED
  88.  
  89. |deletearrayentry|
  90. WT DeleteArrayEntry <ArrayVar>, {ArrayIndex}
  91. PL Deletes the array entry at the given index
  92. PL in the specified array variable.  All
  93. PL indices greater than the specified index
  94. PL will be renumbered starting at Index+1.
  95. PL
  96. PT SEE ALSO: 
  97. BS InsertArrayEntry
  98. PT  and 
  99. BS Dispose
  100. PT .
  101. ED
  102.  
  103. |evaluate|
  104. WT {Result}=Evaluate({Expression})
  105. PT SEE: 
  106. BS EvaluateExpression
  107. PT .
  108. ED
  109.  
  110. |evaluateexpression|
  111. WT {Result}=EvaluateExpression({Expression})
  112. PL If the string contains a valid expression,
  113. PL this function returns its result.  If
  114. PL the expression is not valid it will cause
  115. PT a run time error.  Use 
  116. BS VerifyExpression
  117. PL
  118. PT first to avoid such problems. 
  119. ED
  120.  
  121. |firstarrayindex|
  122. WT {ArrayIndex}=FirstArrayIndex(<ArrayVar>)
  123. PL Returns the integer value of the smallest
  124. PL index in the array specified by VarName.
  125. PL If the array does not have any entries,
  126. PL this function will return the value 0 and
  127. PT the system variable 
  128. BS SearchFound
  129. PL  will be set
  130. PT to 
  131. BS False
  132. PT .  SEE ALSO: 
  133. BS LastArrayIndex
  134. PT .
  135. ED
  136.  
  137. |formatvalue|
  138. WT {String}=FormatValue({Value}, {FormatString})
  139. PL This will format {Value} using the
  140. PL {FormatString}, which describes how you want
  141. PL the number to represented.   See pages 6-6
  142. PL thru 6-9 in the supplement manual for a full
  143. PL description of this command.
  144. ED
  145.  
  146. |getdbobjects|
  147. WT {RecordVar}=GetDBObjects
  148. PL Returns a record variable containing a
  149. PL Record corresponding to the matching
  150. PL qualifying Objects in the Current Card.
  151. PL See page 6-22 in the supplement manual
  152. PL for a full description of this command.
  153. PT SEE ALSO: 
  154. BS SetDBObjects
  155. PT .
  156. ED
  157.  
  158. |global|
  159. WT Global <VarName>
  160. PL All variables are global by default, except
  161. PT those that are declared with the 
  162. BS Local
  163. PL  and
  164. BS Static
  165. PL  commands, but this command was made
  166. PL for consistency.
  167. ED
  168.  
  169. |hextochars|
  170. WT {String}=HexToChars({HexString})
  171. PT This converts the result of 
  172. BS CharsToHex
  173. PL
  174. PT function or the 
  175. BS FileReadChars
  176. PL  command into
  177. PL a normal character string.
  178. ED
  179.  
  180. |hextointeger|
  181. WT {Integer}=HexToInteger({HexString})
  182. PT This converts the result of 
  183. BS IntegerToHex
  184. PL
  185. PT function or the 
  186. BS FileReadChars
  187. PL  command into
  188. PL a normal integer.
  189. ED
  190.  
  191. |infinity|
  192. WT {Real}=Infinity
  193. PL Returns the IEEE double precision value for
  194. PL Infinity.  See page 6-6 in the supplement
  195. PL manual for a full description of this
  196. PL command.
  197. PL
  198. PT SEE ALSO: 
  199. BS NotANumber
  200. PT  and 
  201. BS ValidReal
  202. PT .
  203. ED
  204.  
  205. |ifthen|
  206. WT {Result}=IfThen({Logical}, {TrueExpression} [,{FalseExpression}])
  207. PL This returns the {TrueExpression} if the
  208. PT {Logical} is 
  209. BS True
  210. PL , otherwise it returns the
  211. PT {FalseExpression} or 
  212. BS Nothing
  213. PL  if the {False-
  214. PL Expression} is not given.
  215. PL
  216. PT SEE ALSO: 
  217. BS Match
  218. PT  and 
  219. BS Case
  220. PT .
  221. ED
  222.  
  223. |input|
  224. WT {String}=Input({Prompt})
  225. PL Similar to Input Function in BASIC.  It
  226. PL displays the "Prompt" in the CLI and waits
  227. PL for user to type information ending in the
  228. PL RETURN key being pressed.  This function
  229. PL returns the information typed by the user.
  230. PL You must have a CLI for this to work.
  231. ED
  232.  
  233. |insertarrayentry|
  234. WT InsertArrayEntry <ArrayVar>, {ArrayIndex}
  235. PL Makes room for a new array index in the
  236. PL specified array.  This cause all Array
  237. PL Indicies grater than the specified Index to
  238. PL be renumbered starting at Index+1.  This
  239. PL is useful for adding records to a database.
  240. PT SEE ALSO: 
  241. BS DeleteArrayEntry
  242. PT .
  243. ED
  244.  
  245. |insertrecordnames|
  246. WT InsertRecordNames <RecordVar>
  247. PL Types the record names for the specified
  248. PL RecordVar into the current document.  This
  249. PL can be used to find out any unknown Record
  250. PL Names within the variable specified.
  251. ED
  252.  
  253. |integertohex|
  254. WT {HexString}=IntegerToHex({Integer})
  255. PL This converts an integer into a hexstring.
  256. PL The resulting string will be two, four, six
  257. PL or eight characters long.
  258. PL  <- Echo IntegerToHex(1256)
  259. PL  -> 04E8
  260. PT SEE ALSO: 
  261. BS HexToInteger
  262. PT  and 
  263. BS CharsToHex
  264. PT .
  265. ED
  266.  
  267. |isalias|
  268. WT {Logical}=IsAlias(<VarName>)
  269. PT This returns 
  270. BS True
  271. PL  if the variable indicated
  272. PL by <VarName> is an aliased variable.
  273. PL
  274. PT SEE ALSO: 
  275. BS Alias
  276. PT .
  277. ED
  278.  
  279. |lastarrayindex|
  280. WT {ArrayIndex}=LastArrayIndex(<ArrayVar>)
  281. PL Returns the integer value of the largest
  282. PL index in the array specified by VarName.
  283. PL If the array does not have any entries,
  284. PL this function will return the value 0 and
  285. PT the system variable 
  286. BS SearchFound
  287. PL  will be set
  288. PT to 
  289. BS False
  290. PT .  SEE ALSO: 
  291. BS FirstArrayIndex
  292. PT .
  293. ED
  294.  
  295. |limit|
  296. WT {Integer}=Limit({MinLimit}, {MaxLimit}, {TestInteger})
  297. PL Returns the {TestInteger} if it is between
  298. PL {MinLimit} and {MaxLimit}.  If {TestInteger}
  299. PL is greater than both limits, it will return
  300. PL the larger of the limits.  If {TestInteger}
  301. PL is smaller than both limits, it will return
  302. PL the smaller of the limits.
  303. ED
  304.  
  305. |loadvariable|
  306. WT {Result}=LoadVariable({FilePath})
  307. PL Returns the contents of the variable which
  308. PL was saved in the given file.
  309. PL 
  310. PT SEE ALSO: 
  311. BS SaveVariable
  312. PT .
  313. ED
  314.  
  315. |local|
  316. WT Local <VarName>
  317. PL Declares a variable as available only to
  318. PL the currently running script.
  319. PL
  320. PT SEE ALSO: 
  321. BS Static
  322. PT  and 
  323. BS Global
  324. PT .
  325. ED
  326.  
  327. |match|
  328. WT {Integer}=Match({Integer or String}, {MatchingData1} [,up to ten matching datas])
  329. PL Returns an integer value indicating which
  330. PL {Integer or String} matches any of the
  331. PL {MatchingData}s, or 0 if none do.
  332. PL See page 6-41 in the supplement manual for
  333. PL a full description of this command.
  334. PT SEE ALSO: 
  335. BS Case
  336. PT  and 
  337. BS IfThen
  338. PT .
  339. ED
  340.  
  341. |nextarrayindex|
  342. WT {ArrayIndex}=NextArrayIndex(<ArrayVar>, {ArrayIndex})
  343. PL Returns the next larger Index value greater
  344. PL than <Index> in the array specified by
  345. PL VarName.  If there is not one, this
  346. PL function will return the given Index and
  347. PT set the system variable 
  348. BS SearchFound
  349. PL  to
  350. BS False
  351. PT .  SEE ALSO: 
  352. BS PreviousArrayIndex
  353. PT .
  354. ED
  355.  
  356. |notanumber|
  357. WT {Real}=NotANumber
  358. PL Contains the value returned by some floating
  359. PL point operations which have undefined
  360. PL results.  See page 6-6 in the supplement
  361. PL manual for a full description of this
  362. PL command.
  363. PT SEE ALSO: 
  364. BS Infinity
  365. PT  and 
  366. BS ValidReal
  367. PT .
  368. ED
  369.  
  370. |numberofarrayentries|
  371. WT {Integer}=NumberOfArrayEntries(<ArrayVar>)
  372. PL Returns the number of entries in the
  373. PL specified array.
  374. ED
  375.  
  376. |previousarrayindex|
  377. WT {Integer}=PreviousArrayIndex(<ArrayVar>, {ArrayIndex})
  378. PL Returns the next smaller Index value
  379. PL smaller than <Index> in the array specified
  380. PL by VarName.  If there is not one, this
  381. PL function will return the given Index and
  382. PT set the system variable 
  383. BS SearchFound
  384. PL  to
  385. BS False
  386. PT .  SEE ALSO: 
  387. BS NextArrayIndex
  388. PT .
  389. ED
  390.  
  391. |savevariable|
  392. WT SaveVariable <VarName>, {FilePath}
  393. PL Saves the contents of Variable into the
  394. PL specified file.  If the variable is an
  395. PL array or record, the entire array or record
  396. PL will be saved.
  397. PL 
  398. PT SEE ALSO: 
  399. BS LoadVariable
  400. PT .
  401. ED
  402.  
  403. |searcharray|
  404. WT {ArrayIndex}=SearchArray(<ArrayVar>, {DataToSearchFor} [,{KeyString} [,{StartAtIndex}]])
  405. PL Searches the given array for the given
  406. PL value.  The {KeyString} specifies the record
  407. PL name or subarray index to search on.  The
  408. PL {StartAtIndex} may also be specified.
  409. PT SEE ALSO: 
  410. BS SetSearchArrayFlags
  411. PL  and 
  412. PT           
  413. BS SearchFound
  414. PT .
  415. ED
  416.  
  417. |setdbobjects|
  418. WT SetDBObjects <RecordVar>
  419. PL Sets the DataBase qualifying objects in the
  420. PL window to the corresponding record entries.
  421. PL 
  422. PT SEE ALSO: 
  423. BS GetDBObjects
  424. PT .
  425. ED
  426.  
  427. |setsearcharrayflags|
  428. WT SetSearchArrayFlags <flags>
  429. PL This adjusts the searching parameters used
  430. PT by the 
  431. BS SearchArray
  432. PL  function.  See page 6-19
  433. PL in the supplement manual for a full
  434. PL description of this command.
  435. ED
  436.  
  437. |sortarray|
  438. WT SortArray <ArrayVar>, <flags> [,{KeyString}]
  439. PL Sorts the specified array variable.  See
  440. PL page 6-15 in the supplement manual for a
  441. PL full description of this command.
  442. ED
  443.  
  444. |static|
  445. WT Static <VarName>
  446. PT This is like 
  447. BS Local
  448. PL , except static variables
  449. PL survive beyond the current execution.  Which
  450. PL means that the next time thru this script
  451. PL the variable will still contain the old
  452. PL value.
  453. PT SEE ALSO: 
  454. BS Global
  455. PT .
  456. ED
  457.  
  458. |validreal|
  459. WT {Logical}=ValidReal({Real})
  460. PT Returns 
  461. BS True
  462. PL  if the value is a valid
  463. PL non-infinite real number and is not a
  464. PL NotANumber.  See page 6-6 in the supplement
  465. PL manual for a full description of this
  466. PL command.
  467. PT SEE ALSO: 
  468. BS NotANumber
  469. PT  and 
  470. BS Infinity
  471. PT .
  472. ED
  473.  
  474. |vartype|
  475. WT {String}=VarType(<VarName>)
  476. PL Returns a string indicating the value type
  477. PL for a specified <VarName>.  The can be:
  478. PL "String", "Integer", "Real", "Logical",
  479. PL "Nothing", "System", "Array" or "Record".
  480. PT NOTE: 
  481. BS Alias
  482. PL  variables can only be discovered
  483. PT with the 
  484. BS IsAlias
  485. PL  function.
  486. ED
  487.  
  488. |verifyexpression|
  489. WT {Logical}=VerifyExpression({Expression})
  490. PT Returns 
  491. BS True
  492. PL  if the string contains a
  493. PL valid expression, otherwise it returns
  494. BS False
  495. PL .  This command should be used
  496. PT before using the 
  497. BS EvaluateExpression
  498. PL  function
  499. PL to avoid run time errors.
  500. ED
  501.